package work.xiaohong.jijin.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import work.xiaohong.model.Result;

/**
 * @author xiaohong
 * @version 1.0
 * @date 2021/12/30 0030 11:39
 * @description
 */
@FeignClient(name = "xiaohong-email",contextId = "qqEmail")
public interface QQEmailFeign {

    /**
     * 发送纯文本格式邮件
     * @param receiver
     * @param title
     * @param text
     * @return
     */
    @GetMapping("/email/qq/txt")
    Result sendTxtMail(@RequestParam("receiver") String receiver, @RequestParam("title")String title, @RequestParam("text")String text);

    /**
     * 发送非纯文本格式邮件
     * @param receiver
     */
    @GetMapping("/email/qq/file")
    Result sendFileMail(@RequestParam("receiver") String receiver);

    /**
     * 日志系统报警邮件 http://你的webhook地址？message=报警内容&mobile=接收人手机号
     * @param message
     * @param mobile
     */
    @GetMapping("/email/qq/log")
    Result sendLogMail(@RequestParam("message") String message, @RequestParam("mobile") String mobile);

}
